package com.ruoyi.system.domain.po;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.system.domain.Paper;
import com.ruoyi.system.domain.Subject;

import java.util.Date;
import java.util.List;

public class PaperPo {
    /** 考卷id */
    private Long paperId;

    /** 考卷名 */
    @Excel(name = "考卷名")
    private String name;

    /** 题目数量 */
    @Excel(name = "题目数量")
    private Long count;

    private List<Subject> subjectList;

    /** 出卷人 */
    @Excel(name = "出卷人")
    private String producer;

    /** 出卷时间 */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @Excel(name = "出卷时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date makeTime;


    public Long getPaperId() {
        return paperId;
    }

    public void setPaperId(Long paperId) {
        this.paperId = paperId;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public Long getCount() {
        return count;
    }

    public void setCount(Long count) {
        this.count = count;
    }

    public List<Subject> getSubjectList() {
        return subjectList;
    }

    public void setSubjectList(List<Subject> subjectList) {
        this.subjectList = subjectList;
    }

    public String getProducer() {
        return producer;
    }

    public void setProducer(String producer) {
        this.producer = producer;
    }

    public Date getMakeTime() {
        return makeTime;
    }

    public void setMakeTime(Date makeTime) {
        this.makeTime = makeTime;
    }

    public PaperPo(List<Subject> subjectList, Paper paper) {
        this.paperId = paper.getPaperId();
        this.name = paper.getName();
        this.count = paper.getCount();
        this.subjectList = subjectList;
        this.producer = paper.getProducer();
        this.makeTime = paper.getMakeTime();

    }

    public PaperPo(Long paperId, String name, Long count, List<Subject> subjectList, String producer, Date makeTime) {
        this.paperId = paperId;
        this.name = name;
        this.count = count;
        this.subjectList = subjectList;
        this.producer = producer;
        this.makeTime = makeTime;
    }
}
